<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>在线</title>
	<style type="text/css">
	    *{
	    	margin:0;padding:0;
	    }
	    li{
	    	list-style: none;position: relative;
	    }
        .body{
        	width:400px;height: 700px;border:1px solid #ccc;margin:50px auto;position: relative;
        }
        .user img{
        	width:50px;height: 50px;border-radius: 100%;
        }
        .header{
            position:relative;background:lightblue;height:100px;
        }
        .user{
        	position: absolute;top:20px;left:20px;
        }
        .info{
        	position: absolute;right:20px;top:50px;
        }
        .user_list li a img{
        	width:20px;height: 20px;
        }
        .user_list li a p{
        	position: absolute;top:0;left:25px;
        }
        .user_list{
        	padding:5px 5px;position: relative;top:50px;left:30px;
        }
        a{
        	text-decoration:none;color:black;
        }
        .footer{
        	height:50px;background: lightblue;position:absolute;width:400px;bottom:0;
        }

	</style>
</head>
<body>
    
    <div class="body">

        <div class="header">
        	<p class="user"><img src="images/a.jpg" alt="">&nbsp;<?php echo $res['username']?></p>
        	<p class="info">消息(2)</p>
        </div>

        <div class="content" style="position: relative;">
            <div class="group">
            	<a a href="" class="left" style="position: absolute;top:20px;left:10%;">联系人</a>
            	<a  a href="" class="mid" style="position: absolute;top:20px;left:30%;">分组</a>
            	<a  a href="" class="right" style="position: absolute;top:20px;left:50%;">QQ空间</a>
            </div>


            <?php foreach ($result as $key => $value): ?>

        	<ul class="user_list">
        		<li><a href="talk.php?id=<?php echo $value['id']; ?>"><img src="images/a.jpg" alt=""><p><?php echo $value['username']?></p></a></li>
        		
        	</ul>

            <?php endforeach ?>
            
        </div>

        <div class="footer">
        	<a href="friend.php" style="position: relative;left:30px;top:20px;">添加联系人</a>
        	<a href="index.php?action=logout" style="position: relative;left:250px;top:20px;">退出</a>
        </div>
   	
    </div>
    
	
</body>
</html>